﻿
namespace TransportAnalizerTests.FunctionalTests
{
    using System;
    using System.Linq;
    using Microsoft.VisualStudio.TestTools.UnitTesting;
    using TransportAnalizer_2._0.Model;

    [TestClass]
    class BusinessContextTests
    {
        [TestMethod]
        [ExpectedException(typeof(ArgumentNullException))]
        public void AddNewNodeType_ThrowsException_WhenNameIsNull()
        {
            using (var bc = new BusinessContext())
            {
                var nodeType = new NodeType
                               {
                                   Name = null,
                                   Passage = 30,
                                   Regulation = RegulationType.NoRegulation
                               };

                bc.CreateNodeType(nodeType);
            }
        }
    }
}
